From: Andreas Beckmann Date: Wed, 27 Jan 2021 20:26:51 +0000 (+0100) Subject: [PATCH 099/144] restore setting unroll-threshold on LLVM 9 X-Git-Tag: archive/raspbian/1.8-3+rpi1^2~45 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bfb0f91691bdb79c8b9f65350119b81d7d464866;p=pocl.git [PATCH 099/144] restore setting unroll-threshold on LLVM 9 otherwise kernel/test_rotate hangs on avx512 capable cpus all other llvm releases work fine without this setting (this partially reverts 459d0bb5241a62af3b5b607a65dcf5e9a34a01ee) fixes: #915 Gbp-Pq: Name 0099-restore-setting-unroll-threshold-on-LLVM-9.patch --- diff --git a/lib/CL/pocl_llvm_utils.cc b/lib/CL/pocl_llvm_utils.cc index 675094d..bcbf2e4 100644 --- a/lib/CL/pocl_llvm_utils.cc +++ b/lib/CL/pocl_llvm_utils.cc @@ -344,6 +344,11 @@ void InitializeLLVM() { assert(O && "could not find LLVM option 'debug'"); O->addOccurrence(1, StringRef("debug"), StringRef("true"), false); } +#if LLVM_MAJOR == 9 + O = opts["unroll-threshold"]; + assert(O && "could not find LLVM option 'unroll-threshold'"); + O->addOccurrence(1, StringRef("unroll-threshold"), StringRef("1"), false); +#endif } }